local jiaozi = fk.CreateSkill{
  name = "rmt__jiaozi",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["rmt__jiaozi"] = "骄恣",
  [":rmt__jiaozi"] = "锁定技，当你造成或受到伤害时，若你的手牌为全场唯一最多，则此伤害+1。",

  ["$rmt__jiaozi1"] = "护驾东归，元功于国，某必名垂竹帛！",
}

local jiaozi_spec = {
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(jiaozi.name) and
      table.every(player.room:getOtherPlayers(player, false), function(p)
        return player:getHandcardNum() > p:getHandcardNum()
      end)
  end,
  on_use = function(self, event, target, player, data)
    data:changeDamage(1)
  end,
}

jiaozi:addEffect(fk.DamageCaused, {
  anim_type = "offensive",
  can_trigger = jiaozi_spec.can_trigger,
  on_use = jiaozi_spec.on_use,
})
jiaozi:addEffect(fk.DamageInflicted, {
  anim_type = "negative",
  can_trigger = jiaozi_spec.can_trigger,
  on_use = jiaozi_spec.on_use,
})

return jiaozi
